Create GetInsightData for deploy frequency#1188
Conversation
pkg/app/api/grpcapi/web_api.go
Outdated
| } | ||
|
|
||
| // getInsightDataForDeployFrequency returns the accumulated insight data for deploy frequency. | ||
| func (a *WebAPI) getInsightDataForDeployFrequency(ctx context.Context, projectId string, req *webservice.GetInsightDataRequest) (*webservice.GetInsightDataResponse, error) { |
There was a problem hiding this comment.
method parameter projectId should be projectID
|
Code coverage for golang is
|
|
Code coverage for golang is
|
|
Code coverage for golang is
|
|
/lgtm |
pkg/app/api/grpcapi/web_api_test.go
Outdated
|
|
||
| for _, tt := range tests { | ||
| t.Run(tt.name, func(t *testing.T) { | ||
|
|
There was a problem hiding this comment.
nit: can you remove the unneeded line?
|
Thanks for the beautiful code! Looks good except for some nits comments. I especially like the part of modularizing movePoint func. |
|
@nakabonne Thank you for your review, fixed them :) |
|
/cc @nghialv |
|
/lgtm |
|
The golinter build is completed with FAILURE. The build will be triggered again when you push any other commits. Or you can trigger it manually by You can check the build log from here. |
|
Code coverage for golang is
|
|
@nghialv Thank you for your review, fixed them :) |
|
Code coverage for golang is
|
|
The following files are not gofmt-ed. By commenting pkg/app/api/grpcapi/web_api.go--- pkg/app/api/grpcapi/web_api.go.orig
+++ pkg/app/api/grpcapi/web_api.go
@@ -1382,7 +1382,7 @@
for j := 0; ; j++ {
deployments, err := a.deploymentStore.ListDeployments(ctx, datastore.ListOptions{
PageSize: pageSize,
- Page: j + 1,
+ Page: j + 1,
Filters: filters,
})
if err != nil {
pkg/app/api/grpcapi/web_api_test.go--- pkg/app/api/grpcapi/web_api_test.go.orig
+++ pkg/app/api/grpcapi/web_api_test.go
@@ -421,7 +421,7 @@
s.EXPECT().
ListDeployments(gomock.Any(), datastore.ListOptions{
PageSize: PageSizeForListDeployments,
- Page: 1,
+ Page: 1,
Filters: []datastore.ListFilter{
{
Field: "ProjectId",
@@ -458,7 +458,7 @@
s.EXPECT().
ListDeployments(gomock.Any(), datastore.ListOptions{
PageSize: PageSizeForListDeployments,
- Page: 1,
+ Page: 1,
Filters: []datastore.ListFilter{
{
Field: "ProjectId",
@@ -528,7 +528,7 @@
s.EXPECT().
ListDeployments(gomock.Any(), datastore.ListOptions{
PageSize: PageSizeForListDeployments,
- Page: 1,
+ Page: 1,
Filters: []datastore.ListFilter{
{
Field: "ProjectId",
|
|
Code coverage for golang is
|
pkg/app/api/grpcapi/web_api_test.go
Outdated
| "time" | ||
|
|
||
| "go.uber.org/zap" | ||
|
|
There was a problem hiding this comment.
nit: Remove this empty line. (zap is a third-party package so it should be at the same group with gomock and assert.)
|
Nice. Thank you. |
|
Remove |
| } | ||
|
|
||
| // getInsightDataForDeployFrequency returns the accumulated insight data for deploy frequency. | ||
| // This function is temporary implementation for front end. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
ref #1142
Does this PR introduce a user-facing change?: